import copy
a= {"name":"xiaoxiao","age":18,'class':{'年级':'一年级','班号':6}}

b=copy.copy(a)      #浅拷贝
c=copy.deepcopy(a)  #深拷贝

# del a['name']
# a.setdefault('爱好','看书')
M={'备注':'sdjfjsdfkj'}
a.update(M)
a['class']['班号']=5

print("a=",a,'\n',"浅拷贝b=",b,'\n',"深拷贝c=",c)
print(id(a),'\n',id(b),'\n',id(c))